﻿namespace Sustainalytics.ReportGenerator.BL
{
    public class LogAggregator
    {
        private readonly ILogPdf[] _logs;

        public LogAggregator(ILogPdf[] logs)
        {
            this._logs = logs;
        }

        public void Log(string msg)
        {
            foreach (var logPdf in this._logs)
            {
                logPdf.LogGenerationData(msg);
            }
        }

        public void LogSummary(string msg)
        {
            foreach (var logPdf in this._logs)
            {
                logPdf.LogSummary(msg);
            }
        }

        public void LogSuccess(string message)
        {
            foreach (var logPdf in this._logs)
            {
                logPdf.LogSuccess(message);
            }
        }

        public void LogError(string errorMessage)
        {
            foreach (var logPdf in this._logs)
            {
                logPdf.LogError(errorMessage);
            }
        }
    }
}
